package com.cmbc.bean;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author jianghaoqiang
 * @Date 2022/5/22
 * 1.通过xml来定义bean
 */
public class CreateByXMLTest {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext classPathXmlApplicationContext=new ClassPathXmlApplicationContext("META-INF/bean/spring.xml");
        User user= classPathXmlApplicationContext.getBean("user",User.class);
        System.out.println(user);
    }
}
